export type StatusMap = Record<0 | 1 | 2 | 3 | 4 | 5, { type: 'danger' | 'info' | 'primary' | 'success' | 'warning'; upLabel: string; auditLabel: string }>;

//上传状态：0-待发布；1-发布中；2-发布完成；3-发布失败；4-发布待更新；*/
export type PlatformUploadStatus = 0 | 1 | 2 | 3 | 4;

export const statusMapList = ref<StatusMap>({
  0: {
    type: 'primary',
    upLabel: '待发布',
    auditLabel: '待提审',
  },
  1: {
    type: 'success',
    upLabel: '发布中',
    auditLabel: '已提审',
  },
  2: {
    type: 'info',
    upLabel: '发布完成',
    auditLabel: '审核通过',
  },
  3: {
    type: 'danger',
    upLabel: '发布失败',
    auditLabel: '审核拒绝',
  },
  4: {
    type: 'warning',
    upLabel: '待同步',
    auditLabel: '审核中',
  },
  5: {
    type: 'danger',
    upLabel: '未知',
    auditLabel: '最终失败',
  },
});

export const statusMap = ref<StatusMap>({
  0: {
    type: 'primary',
    upLabel: '待上传',
    auditLabel: '待提审',
  },
  1: {
    type: 'success',
    upLabel: '上传中',
    auditLabel: '已提审',
  },
  2: {
    type: 'info',
    upLabel: '上传完成',
    auditLabel: '审核通过',
  },
  3: {
    type: 'danger',
    upLabel: '上传失败',
    auditLabel: '审核拒绝',
  },
  4: {
    type: 'warning',
    upLabel: '待同步',
    auditLabel: '审核中',
  },
  5: {
    type: 'danger',
    upLabel: '未知',
    auditLabel: '最终失败',
  },
});
